echo Building kernel!
cd kernel

make
cp kernel.bin ../loader/kernel.bin
make clean

echo Building loader!
cd ../loader

make
rm kernel.bin
cp loader.elf ../isoimage/boot
make clean

echo Prepare ISO-Image
cd ..

genisoimage -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 --boot-info-table -o bootable.iso isoimage

cp bootable.iso /home/xubuntu/shared
rm bootable.iso
